﻿using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using bus_TienichNPC;
using busDanhMuc;
using System.Collections.Generic;

namespace serBaocaoNPC
{
    /// <summary>
    /// Summary description for Service_NPCUS
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class Service_NPCUS : System.Web.Services.WebService
    {

        cls_TienichNPC_bus bus = new cls_TienichNPC_bus();
        cls_D_DVI_QLY bus_D_DVI_QLY = new cls_D_DVI_QLY();

        cls_NPC_USER_bus bus_NPC_USER = new cls_NPC_USER_bus();
        cls_NPC_LIBRARY bus_NPC_LIBRARY = new cls_NPC_LIBRARY();
        cls_NPC_MENU bus_NPC_MENU = new cls_NPC_MENU();
        cls_NPC_MENUOFUSER bus_NPC_MENUOFUSER = new cls_NPC_MENUOFUSER();
        cls_NPC_TRTH_CHISO bus_NPC_TRTH_CHISO = new cls_NPC_TRTH_CHISO();
        cls_NPC_TRTH_DDO bus_NPC_TRTH_DDO = new cls_NPC_TRTH_DDO();
        cls_NPC_TRTH_KHANG bus_NPC_TRTH_KHANG = new cls_NPC_TRTH_KHANG();
        cls_ImportExcel_bus bus_ImportExcel = new cls_ImportExcel_bus();
        cls_THONGTIN_KHANG bus_THONGTIN_KHANG = new cls_THONGTIN_KHANG();
        NPC_CHAMNO_OFFLINE_bus bus_NPC_CHAMNO_OFFLINE = new NPC_CHAMNO_OFFLINE_bus();
        CN_THEODOINO_bus bus_CN_THEODOINO = new CN_THEODOINO_bus();
        [WebMethod]
        public string HelloWorld()
        {
            return "Hello World";
        }
        #region  Baocao NPC

        [WebMethod]
        public DataSet get_thang_lviec()
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus.get_thang_lviec();
                return ds;
            }
            catch
            {
                return null;
            }
        }
        [WebMethod]
        public DataSet get_D_DVIQLY(string p_madonvi)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus.get_D_DVIQLY(p_madonvi);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet select_D_DVI_QLY_ALL(string strMadviqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus.select_D_DVI_QLY_ALL(strMadviqly);
                return ds;
            }
            catch
            { return null; }
        }

        # region KDDN-09
        [WebMethod]
        public DataSet select_BCKD11(System.String strTEN_DVIQLY, System.String strTEN_CTREN, System.String pr_MA_DVIQLY, System.Int16 intNam, System.Int16 intThang)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus.select_BCKD11(strTEN_DVIQLY, strTEN_CTREN, pr_MA_DVIQLY, intNam, intThang);
                return ds;
            }
            catch
            { return null; }
        }

        [WebMethod]
        public DataSet TH_KDDN09(Int16 p_nam, Int16 p_thang, string p_madonvi)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus.TH_KDDN09(p_nam, p_thang, p_madonvi);
                return ds;
            }
            catch
            { return null; }
        }

        # endregion

        #  region KDDN-10
        [WebMethod]
        public void TH_BCTTCC(string p_madonvi, Int16 p_thang, Int16 p_nam)
        {
            try
            {
                bus.TH_BCTTCC(p_madonvi, p_thang, p_nam);
            }
            catch
            { return; }
        }
        [WebMethod]
        public void TH_BCTTTT(string p_madonvi, Int16 p_thang, Int16 p_nam, string p_nhapth, string p_dncd)
        {
            try
            {
                bus.TH_BCTTTT(p_madonvi, p_thang, p_nam, p_nhapth, p_dncd);
            }
            catch
            { return; }
        }
        [WebMethod]
        public void TH_BCTTDD(string p_madonvi, Int16 p_thang, Int16 p_nam, string p_nhapth)
        {
            try
            {
                bus.TH_BCTTDD(p_madonvi, p_thang, p_nam, p_nhapth);
            }
            catch
            { return; }
        }
        [WebMethod]
        public void TH_BCKD07(string p_madonvi, Int16 p_thang, Int16 p_nam)
        {
            try
            {
                bus.TH_BCKD07(p_madonvi, p_thang, p_nam);
            }
            catch
            { return; }
        }
        [WebMethod]
        public bool Capnhat_BCKD07_saunhap(string p_madonvi, Int16 p_thang, Int16 p_nam)
        {
            try
            {
                if (bus.Capnhat_BCKD07_saunhap(p_madonvi, p_thang, p_nam))
                {
                    return true;
                }
                else return false;
            }
            catch
            { return false; }
        }
        [WebMethod]
        public DataSet get_bcttcc(string p_madonvi, Int16 p_thang, Int16 p_nam)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus.get_bcttcc(p_madonvi, p_thang, p_nam);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet get_bctt_quy(string p_madonvi, Int16 p_nam, Int16 p_thang, Int16 pbieu, string p_nhapth)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus.get_bctt_quy(p_madonvi, p_nam, p_thang, pbieu, p_nhapth);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet get_bctttt(string p_madonvi, Int16 p_thang, Int16 p_nam, string p_nhapth)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus.get_bctttt(p_madonvi, p_thang, p_nam, p_nhapth);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet get_bctskt(string p_madonvi, Int16 p_thang, Int16 p_nam)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus.get_bctskt(p_madonvi, p_thang, p_nam);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet khoitao_BCTSKT(string p_madonvi, Int16 p_thang, Int16 p_nam,Int16 pthangtruoc)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus.khoitao_BCTSKT(p_madonvi, p_thang, p_nam, pthangtruoc);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet get_bcttdd(string p_madonvi, Int16 p_thang, Int16 p_nam)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus.get_bcttdd(p_madonvi, p_thang, p_nam);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet get_bckd07(string p_madonvi, Int16 p_thang, Int16 p_nam)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus.get_bckd07(p_madonvi, p_thang, p_nam);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public void CapnhatdstramCC_KH(string p_madonvi)
        {
            try
            {
                bus.CapnhatdstramCC_KH(p_madonvi);
            }
            catch
            { return; }
        }
        [WebMethod]
        public void CapnhatdsloTT_KH(string p_madonvi)
        {
            try
            {
                bus.CapnhatdsloTT_KH(p_madonvi);
            }
            catch
            { return; }
        }

        [WebMethod]
        public DataSet Load_KHOACHTRAMCC(string p_madonvi)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus.Load_KHOACHTRAMCC(p_madonvi);
                return ds;
            }
            catch
            { return null; }
        }

        [WebMethod]
        public DataSet Load_KHOACHLOTT(string p_madonvi)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus.Load_KHOACHLOTT(p_madonvi);
                return ds;
            }
            catch
            { return null; }
        }

        [WebMethod]
        public bool update_bckd07(DataSet ds)
        {
            try
            {
                if (bus.update_bckd07(ds))
                {
                    return true;
                }
                else return false;
            }
            catch
            { return false; }
        }
        [WebMethod]
        public bool update_khttcc(DataSet ds)
        {
            try
            {
                if (bus.update_khttcc(ds))
                {
                    return true;
                }
                else return false;
            }
            catch
            { return false; }
        }
        [WebMethod]
        public bool update_khtttt(DataSet ds)
        {
            try
            {
                if (bus.update_khtttt(ds))
                {
                    return true;
                }
                else return false;
            }
            catch
            { return false; }
        }
        [WebMethod]
        public bool update_bctskt(DataSet ds)
        {
            try
            {
                if (bus.update_bctskt(ds))
                {
                    return true;
                }
                else return false;
            }
            catch
            { return false; }
        }

        #endregion

        # region KDDN-13
        [WebMethod]
        public void PC1_BIEU16_IN(string p_ma_dviqly, Int16 p_thang, Int16 p_nam, string p_stt, string p_maso, string p_danhmuc, Int16 p_sltbc, decimal p_dg, string p_ghichu)
        {
            try
            {
                bus.PC1_BIEU16_IN(p_ma_dviqly, p_thang, p_nam, p_stt, p_maso, p_danhmuc, p_sltbc,p_dg,p_ghichu);
            }
            catch
            { return; }
        }
        [WebMethod]
        public void PC1_BIEU16_UP(string p_ma_dviqly, Int16 p_thang, Int16 p_nam)
        {
            try
            {
                bus.PC1_BIEU16_UP(p_ma_dviqly, p_thang, p_nam);
            }
            catch
            { return; }
        }
        [WebMethod]
        public void PC1_BIEU16_DEL(string p_ma_dviqly, Int16 p_thang, Int16 p_nam)
        {
            try
            {
                bus.PC1_BIEU16_DEL(p_ma_dviqly, p_thang, p_nam);
            }
            catch
            { return; }
        }
        [WebMethod]
        public DataSet select_BCKD16(System.String strTEN_DVIQLY, System.String strTEN_CTREN, System.String pr_MA_DVIQLY, System.Int16 intNam, System.Int16 intThang)
        {

            DataSet ds = new DataSet();
            try
            {
                ds = bus.select_BCKD16(strTEN_DVIQLY, strTEN_CTREN, pr_MA_DVIQLY, intNam, intThang);
                return ds;
            }
            catch
            { return null; }
        }
        #endregion

        #region KDDN-11
        [WebMethod]
        public DataSet select_PC1_BCKD17(String strMa_dviqly, int p_thang, int p_nam)
        {

            DataSet ds = new DataSet();
            try
            {
                ds = bus.select_PC1_BCKD17(strMa_dviqly, p_thang, p_nam);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet KHOITAO_BIEU17(Int16 iNam, Int16 iThang, System.String strMaDviqly)
        {

            DataSet ds = new DataSet();
            try
            {
                ds = bus.KHOITAO_BIEU17(iNam, iThang, strMaDviqly);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet INBIEU(System.String strMaDviqly, Int16 iNam, Int16 iThang, Int16 bieu)
        {

            DataSet ds = new DataSet();
            try
            {
                ds = bus.INBIEU(strMaDviqly, iNam, iThang, bieu);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet Chon_cty_dienluc(Int16 iNam, Int16 iThang, System.String strMaDviqly, Int16 p_bieu)
        {

            DataSet ds = new DataSet();
            try
            {
                ds = bus.Chon_cty_dienluc(iNam, iThang, strMaDviqly, p_bieu);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet UPDATE_BIEU17(Int16 iNam, Int16 iThang, System.String strMaDviqly, System.String ma_so, Int64 TSKH, Int64 SL_BBKT, Int64 SL_VPHC, Int64 KQ_HH_CT, Int64 KQ_HH_TUTI, Int64 KQ_HH_MD, Int64 KQ_HH_HSN, Int64 KQ_HH_SK, Int64 KQ_VP_TCD_CM, Int64 KQ_VP_TCD_XPCT, Int64 KQ_VP_TCD_XPMD, Int64 KQ_VP_TCD_HTK, Int64 KQ_VP_CSGCD, Int64 KQ_VP_GD_SMD, Int64 KQ_VP_GD_AGS, Int64 KQ_VP_VPK)
        {

            DataSet ds = new DataSet();
            try
            {
                ds = bus.UPDATE_BIEU17(iNam, iThang, strMaDviqly, ma_so, TSKH, SL_BBKT, SL_VPHC, KQ_HH_CT, KQ_HH_TUTI, KQ_HH_MD, KQ_HH_HSN, KQ_HH_SK, KQ_VP_TCD_CM, KQ_VP_TCD_XPCT, KQ_VP_TCD_XPMD, KQ_VP_TCD_HTK, KQ_VP_CSGCD, KQ_VP_GD_SMD, KQ_VP_GD_AGS, KQ_VP_VPK);
                return ds;
            }
            catch
            { return null; }
        }
        #endregion

        #region KDDN-12
        [WebMethod]
        public DataSet select_PC1_BCKD18(String strMa_dviqly, int p_thang, int p_nam)
        {

            DataSet ds = new DataSet();
            try
            {
                ds = bus.select_PC1_BCKD18(strMa_dviqly, p_thang, p_nam);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet KHOITAO_BIEU18(Int16 iNam, Int16 iThang, System.String strMaDviqly)
        {

            DataSet ds = new DataSet();
            try
            {
                ds = bus.KHOITAO_BIEU18(iNam, iThang, strMaDviqly);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet UPDATE_BIEU18(Int16 iNam, Int16 iThang, System.String strMaDviqly, System.String ma_so, Int64 TSV_DXLX, Int64 TSV_DXL, Int64 TSV_CSCT, Int64 DN_TRTH, Int64 DN_THHO, Int64 DN_BOTH, Int64 ST_TRTH, Int64 ST_THHO, Int64 ST_BOTH, Int64 ST_PH, Int64 ST_THKH)
        {

            DataSet ds = new DataSet();
            try
            {
                ds = bus.UPDATE_BIEU18(iNam, iThang, strMaDviqly, ma_so, TSV_DXLX, TSV_DXL, TSV_CSCT, DN_TRTH, DN_THHO, DN_BOTH, ST_TRTH, ST_THHO, ST_BOTH, ST_PH, ST_THKH);
                return ds;
            }
            catch
            { return null; }
        }
        #endregion

        #region KDDN-00 TUNGND
        [WebMethod]
        public DataSet BCKD00_DANHMUC(String strMa_dviqly, Int16 bieu)
        {

            DataSet ds = new DataSet();
            try
            {
                ds = bus.BCKD00_DANHMUC(strMa_dviqly, bieu);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public void INSERT_DM(Int16 P_STT, string P_DVT, string P_DM, string P_MASO, string p_madonvi)
        {
            try
            {
                bus.INSERT_DM(P_STT, P_DVT, P_DM, P_MASO, p_madonvi);
            }
            catch
            { return; }
        }
        [WebMethod]
        public void UPDATE_DM(Int16 P_STT, string P_DVT, string P_DM, string P_MASO, string p_madonvi)
        {
            try
            {
                bus.UPDATE_DM(P_STT, P_DVT, P_DM, P_MASO, p_madonvi);
            }
            catch
            { return; }
        }
        [WebMethod]
        public void DELETE_DM(Int16 P_STT, string P_DVT, string P_DM, string P_MASO, string p_madonvi)
        {
            try
            {
                bus.DELETE_DM(P_STT, P_DVT, P_DM, P_MASO, p_madonvi);
            }
            catch
            { return; }
        }
        [WebMethod]
        public void tonghop(Int16 p_nam, Int16 p_thang, string p_madonvi)
        {
            try
            {
                bus.tonghop(p_nam, p_thang, p_madonvi);
            }
            catch
            { return; }
        }
        [WebMethod]
        public DataSet KHOITAO_BIEU00(Int16 iNam, Int16 iThang, System.String strMaDviqly)
        {

            DataSet ds = new DataSet();
            try
            {
                ds = bus.KHOITAO_BIEU00(iNam, iThang, strMaDviqly);
                return ds;
            }
            catch
            { return null; }
        }

        [WebMethod]
        public void UPDATE_BIEU00(Int16 p_nam, Int16 p_thang, string p_madonvi)
        {


            try
            {
                bus.UPDATE00(p_nam, p_thang, p_madonvi);

            }
            catch
            { return; }
        }

        [WebMethod]
        public bool DELETE_00(Int16 p_nam, Int16 p_thang, string p_madonvi)
        {
            try
            {
                if (bus.DELETE_00(p_nam, p_thang, p_madonvi))
                { return true; }
                else
                { return false; }

            }
            catch
            { return false; }
        }
        [WebMethod]
        public bool Insert_BCKD00(DataSet ds)
        {
            try
            {
                if (bus.Insert_BCKD00(ds))
                { return true; }
                else { return false; }
            }
            catch
            { return false; }
        }
        [WebMethod]
        public bool BCKD00(Int16 p_nam, Int16 p_thang, string p_madonvi, Int16 P_STT, string P_DM_NAME, string P_MASO, string P_DONVI_DO, Double P_KH_GIAO, Double P_THANG_TH, Double P_LUYKE_TH, string P_PHANTICH_DANHGIA, string P_YKIEN_KHAC)
        {
            try
            {
                if (bus.BCKD00(p_nam, p_thang, p_madonvi, P_STT, P_DM_NAME, P_MASO, P_DONVI_DO, P_KH_GIAO, P_THANG_TH, P_LUYKE_TH, P_PHANTICH_DANHGIA, P_YKIEN_KHAC))
                { return true; }
                else { return false; }
            }
            catch
            { return false; }
        }
        [WebMethod]
        public DataSet select_PC1_BCKD00(String strMa_dviqly, int p_thang, int p_nam)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus.select_PC1_BCKD00(strMa_dviqly, p_thang, p_nam);
                return ds;
            }
            catch
            { return null; }
        }
        #endregion

        # region KDDN-4A
        [WebMethod]
        public void PC1_BIEU4A_IN(string p_ma_dviqly, Int16 p_thang, Int16 p_nam, string p_stt, string p_danhmuc, string p_maso, Decimal p_cu1_dk, Decimal p_dt1_dk, Decimal p_cu3_dk, Decimal p_dt3_dk, Decimal p_cu1_m, Decimal p_dt1_m, Decimal p_cu3_m, Decimal p_dt3_m, Decimal p_cu1_t, Decimal p_dt1_t, Decimal p_cu3_t, Decimal p_dt3_t, string p_ghi_chu)
        {
            try
            {
                bus.PC1_BIEU4A_IN(p_ma_dviqly, p_thang, p_nam, p_stt, p_danhmuc, p_maso, p_cu1_dk, p_dt1_dk, p_cu3_dk, p_dt3_dk, p_cu1_m, p_dt1_m, p_cu3_m, p_dt3_m, p_cu1_t, p_dt1_t, p_cu3_t, p_dt3_t, p_ghi_chu);
            }
            catch
            { return; }
        }
        [WebMethod]
        public void PC1_BIEU4A_UP(string p_ma_dviqly, Int16 p_thang, Int16 p_nam)
        {
            try
            {
                bus.PC1_BIEU4A_UP(p_ma_dviqly, p_thang, p_nam);
            }
            catch
            { return; }
        }
        [WebMethod]
        public void PC1_BIEU4A_DEL(string p_ma_dviqly, Int16 p_thang, Int16 p_nam)
        {
            try
            {
                bus.PC1_BIEU4A_DEL(p_ma_dviqly, p_thang, p_nam);
            }
            catch
            { return; }
        }
        [WebMethod]
        public DataSet select_BCKD4A(System.String strTEN_DVIQLY, System.String strTEN_CTREN, System.String pr_MA_DVIQLY, System.Int16 intNam, System.Int16 intThang)
        {

            DataSet ds = new DataSet();
            try
            {
                ds = bus.select_BCKD4A(strTEN_DVIQLY, strTEN_CTREN, pr_MA_DVIQLY, intNam, intThang);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet select_BCKD4A_Full_CTY(System.String strTEN_DVIQLY, System.String strTEN_CTREN, System.String pr_MA_DVIQLY, System.Int16 intNam, System.Int16 intThang)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus.select_BCKD4A_Full_CTY(strTEN_DVIQLY, strTEN_CTREN, pr_MA_DVIQLY, intNam, intThang);
                return ds;
            }
            catch
            { return null; }
        }
        #endregion

        # region KDDN-4B
        [WebMethod]
        public void PC1_BIEU4B_IN(string p_ma_dviqly, Int16 p_thang, Int16 p_nam, string p_stt, string p_danhmuc, string p_maso, Decimal p_BDA_DK, Decimal p_KHG1_DK, Decimal p_TL1_DK, Decimal p_TONG_DK, Decimal p_CT_DK, Decimal p_HT_DK, Decimal p_KHG2_DK, Decimal p_TL2_DK, Decimal p_BDA_M, Decimal p_CT_M, Decimal p_HT_M, Decimal p_BDA_T, Decimal p_CT_T, Decimal p_HT_T, string p_ghi_chu)
        {
            try
            {
                bus.PC1_BIEU4B_IN(p_ma_dviqly, p_thang, p_nam, p_stt, p_danhmuc, p_maso, p_BDA_DK, p_KHG1_DK, p_TL1_DK, p_TONG_DK, p_CT_DK, p_HT_DK, p_KHG2_DK, p_TL2_DK, p_BDA_M, p_CT_M, p_HT_M, p_BDA_T, p_CT_T, p_HT_T, p_ghi_chu);
            }
            catch
            { return; }
        }
        [WebMethod]
        public void PC1_BIEU4B_UP(string p_ma_dviqly, Int16 p_thang, Int16 p_nam)
        {
            try
            {
                bus.PC1_BIEU4B_UP(p_ma_dviqly, p_thang, p_nam);
            }
            catch
            { return; }
        }
        [WebMethod]
        public void PC1_BIEU4B_DEL(string p_ma_dviqly, Int16 p_thang, Int16 p_nam)
        {
            try
            {
                bus.PC1_BIEU4B_DEL(p_ma_dviqly, p_thang, p_nam);
            }
            catch
            { return; }
        }
        [WebMethod]
        public DataSet select_BCKD4B(System.String strTEN_DVIQLY, System.String strTEN_CTREN, System.String pr_MA_DVIQLY, System.Int16 intNam, System.Int16 intThang)
        {

            DataSet ds = new DataSet();
            try
            {
                ds = bus.select_BCKD4B(strTEN_DVIQLY, strTEN_CTREN, pr_MA_DVIQLY, intNam, intThang);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet select_BCKD4B_Full_CTY(System.String strTEN_DVIQLY, System.String strTEN_CTREN, System.String pr_MA_DVIQLY, System.Int16 intNam, System.Int16 intThang)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus.select_BCKD4B_Full_CTY(strTEN_DVIQLY, strTEN_CTREN, pr_MA_DVIQLY, intNam, intThang);
                return ds;
            }
            catch
            { return null; }
        }
        #endregion

        # region KDDN-5A
        [WebMethod]
        public void PC1_BIEU5A_IN(string p_ma_dviqly, Int16 p_thang, Int16 p_nam, string p_stt, string p_danhmuc, string p_maso, Decimal p_DAU_KY, Decimal p_TANG, Decimal p_GIAM, Decimal p_LUY_KE)
        {
            try
            {
                bus.PC1_BIEU5A_IN(p_ma_dviqly, p_thang, p_nam, p_stt, p_danhmuc, p_maso, p_DAU_KY, p_TANG, p_GIAM, p_LUY_KE);
            }
            catch
            { return; }
        }
        [WebMethod]
        public void PC1_BIEU5A_UP(string p_ma_dviqly, Int16 p_thang, Int16 p_nam)
        {
            try
            {
                bus.PC1_BIEU5A_UP(p_ma_dviqly, p_thang, p_nam);
            }
            catch
            { return; }
        }
        [WebMethod]
        public void PC1_BIEU5A_DEL(string p_ma_dviqly, Int16 p_thang, Int16 p_nam)
        {
            try
            {
                bus.PC1_BIEU5A_DEL(p_ma_dviqly, p_thang, p_nam);
            }
            catch
            { return; }
        }
        [WebMethod]
        public DataSet select_BCKD5A(System.String strTEN_DVIQLY, System.String strTEN_CTREN, System.String pr_MA_DVIQLY, System.Int16 intNam, System.Int16 intThang)
        {

            DataSet ds = new DataSet();
            try
            {
                ds = bus.select_BCKD5A(strTEN_DVIQLY, strTEN_CTREN, pr_MA_DVIQLY, intNam, intThang);
                return ds;
            }
            catch
            { return null; }
        }

        #endregion

        # region KDDN-5B
        [WebMethod]
        public void PC1_BIEU5B_IN(string p_ma_dviqly, Int16 p_thang, Int16 p_nam, string p_stt, string p_danhmuc, string p_maso, Decimal p_PHAT_SINH, Decimal p_LUY_KE, String p_GHI_CHU)
        {
            try
            {
                bus.PC1_BIEU5B_IN(p_ma_dviqly, p_thang, p_nam, p_stt, p_danhmuc, p_maso, p_PHAT_SINH, p_LUY_KE, p_GHI_CHU);
            }
            catch
            { return; }
        }
        [WebMethod]
        public void PC1_BIEU5B_UP(string p_ma_dviqly, Int16 p_thang, Int16 p_nam)
        {
            try
            {
                bus.PC1_BIEU5B_UP(p_ma_dviqly, p_thang, p_nam);
            }
            catch
            { return; }
        }
        [WebMethod]
        public void PC1_BIEU5B_DEL(string p_ma_dviqly, Int16 p_thang, Int16 p_nam)
        {
            try
            {
                bus.PC1_BIEU5B_DEL(p_ma_dviqly, p_thang, p_nam);
            }
            catch
            { return; }
        }
        [WebMethod]
        public DataSet select_BCKD5B(System.String strTEN_DVIQLY, System.String strTEN_CTREN, System.String pr_MA_DVIQLY, System.Int16 intNam, System.Int16 intThang)
        {

            DataSet ds = new DataSet();
            try
            {
                ds = bus.select_BCKD5B(strTEN_DVIQLY, strTEN_CTREN, pr_MA_DVIQLY, intNam, intThang);
                return ds;
            }
            catch
            { return null; }
        }

        #endregion

        #region KDDN - BIA BAOCAO

        [WebMethod]
        public DataSet select_PC1_BIABC(string strMadviqly)
        {

            DataSet ds = new DataSet();
            try
            {
                ds = bus.select_PC1_BIABC(strMadviqly);
                return ds;
            }
            catch
            { return null; }
        }

        [WebMethod]
        public bool insert_PC1_BIABC(string strMadviqly, string strNoidung, string strSobcao)
        {
            bool check = false;
            try
            {
                return check = bus.insert_PC1_BIABC(strMadviqly, strNoidung, strSobcao);
            }
            catch
            { return false; }
        }

        [WebMethod]
        public bool update_PC1_BIABC(string strMadviqly, string strNoidung, string strSobcao)
        {
            bool check = false;
            try
            {
                return check = bus.update_PC1_BIABC(strMadviqly, strNoidung, strSobcao);
            }
            catch
            { return false; }
        }

        #endregion

        #region  Bieu 01 - NGC
        [WebMethod]
        public DataSet select_NGCBIEU01(System.String strTEN_DVIQLY, System.String strTEN_CTREN, System.String pr_MA_DVIQLY, System.Int16 intThang, System.Int16 intNam)
        {

            DataSet ds = new DataSet();
            try
            {
                ds = bus.select_NGCBIEU01(strTEN_DVIQLY, strTEN_CTREN, pr_MA_DVIQLY, intThang, intNam);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public void NGE_BIEU01(string p_ma_dviqly, Int16 p_thang, Int16 p_nam)
        {
            try
            {
                bus.NGE_BIEU01(p_ma_dviqly, p_thang, p_nam);
            }
            catch
            { return; }
        }
        [WebMethod]
        public void NGE_UPDATE01(Decimal p_dientp, Decimal p_tiendien, Decimal p_tiencspk, Decimal p_tiendienthue, Decimal p_tiencspkthue, Int16 p_nam, Int16 p_thang, String p_ma_dviqly, String p_ma_dviqly1)
        {
            try
            {
                bus.NGE_UPDATE01(p_dientp, p_tiendien, p_tiencspk, p_tiendienthue, p_tiencspkthue, p_nam, p_thang, p_ma_dviqly, p_ma_dviqly1);
            }
            catch
            { return; }
        }
        #endregion

        #region  Bieu 02 - NGC
        [WebMethod]
        public DataSet select_NGCBIEU02(System.String strTEN_DVIQLY, System.String strTEN_CTREN, System.String pr_MA_DVIQLY, System.Int16 intThang, System.Int16 intNam)
        {

            DataSet ds = new DataSet();
            try
            {
                ds = bus.select_NGCBIEU02(strTEN_DVIQLY, strTEN_CTREN, pr_MA_DVIQLY, intThang, intNam);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public void NGE_BIEU02(string p_ma_dviqly, Int16 p_thang, Int16 p_nam)
        {
            try
            {
                bus.NGE_BIEU02(p_ma_dviqly, p_thang, p_nam);
            }
            catch
            { return; }
        }
        [WebMethod]
        public void NGE_UPDATE02(Decimal p_congto, Decimal p_hdcnxd, Decimal p_hdqltd, Decimal p_doituong, Decimal p_daky, Decimal p_phaimuacos, Decimal p_nam, Decimal p_thang, String p_ma_dviqly)
        {
            try
            {
                bus.NGE_UPDATE02(p_congto, p_hdcnxd, p_hdqltd, p_doituong, p_daky, p_phaimuacos, p_nam, p_thang, p_ma_dviqly);
            }
            catch
            { return; }
        }
        #endregion

        #region  Bieu 03 - NGC
        [WebMethod]
        public DataSet select_NGCBIEU03(System.String strTEN_DVIQLY, System.String strTEN_CTREN, System.String pr_MA_DVIQLY, System.Int16 intThang, System.Int16 intNam)
        {

            DataSet ds = new DataSet();
            try
            {
                ds = bus.select_NGCBIEU03(strTEN_DVIQLY, strTEN_CTREN, pr_MA_DVIQLY, intThang, intNam);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public void NGE_BIEU03(string p_ma_dviqly, Int16 p_thang, Int16 p_nam)
        {
            try
            {
                bus.NGE_BIEU03(p_ma_dviqly, p_thang, p_nam);
            }
            catch
            { return; }
        }
        #endregion

        #region  Bieu 04 - NGC
        [WebMethod]
        public DataSet select_NGCBIEU04(System.String strTEN_DVIQLY, System.String strTEN_CTREN, System.String pr_MA_DVIQLY, System.Int16 intThang, System.Int16 intNam)
        {

            DataSet ds = new DataSet();
            try
            {
                ds = bus.select_NGCBIEU04(strTEN_DVIQLY, strTEN_CTREN, pr_MA_DVIQLY, intThang, intNam);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public void NGE_BIEU04(Int16 p_nam, Int16 p_thang, string p_ma_dviqly)
        {
            try
            {
                bus.NGE_BIEU04(p_nam, p_thang, p_ma_dviqly);
            }
            catch
            { return; }
        }
        #endregion

        #region  Bieu 05 - NGC
        [WebMethod]
        public DataSet select_NGCBIEU05(System.String strTEN_DVIQLY, System.String strTEN_CTREN, System.String pr_MA_DVIQLY, System.Int16 intThang, System.Int16 intNam)
        {

            DataSet ds = new DataSet();
            try
            {
                ds = bus.select_NGCBIEU05(strTEN_DVIQLY, strTEN_CTREN, pr_MA_DVIQLY, intThang, intNam);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public void NGE_BIEU05(Int16 p_nam, Int16 p_thang, string p_ma_dviqly)
        {
            try
            {
                bus.NGE_BIEU05(p_nam, p_thang, p_ma_dviqly);
            }
            catch
            { return; }
        }
        [WebMethod]
        public void NGE_UPDATE05(Decimal dunodt, Decimal thutthang, String p_madm, Decimal p_nam, Decimal p_thang, String p_ma_dviqly)
        {
            try
            {
                bus.NGE_UPDATE05(dunodt, thutthang, p_madm, p_nam, p_thang, p_ma_dviqly);
            }
            catch
            { return; }
        }
        #endregion



        #endregion

        # region InToGCS Dat hang
        [WebMethod]
        public DataSet TH_INTOGCS(Int16 iNam, Int16 iThang, Int16 iKy, string strMaDviqly, string strMa_SoGCS, string strMa_KHang)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus.TH_INTOGCS(iNam, iThang, iKy, strMaDviqly, strMa_SoGCS, strMa_KHang);
                return ds;
            }
            catch
            {
                return null;
            }
        }

        [WebMethod]
        public DataSet select_SoGCS(System.String pr_MA_DVIQLY, System.String pr_MA_SOGCS, System.String pr_TEN_SOGCS, System.String pr_NGAY_GHI, System.Int16 pr_SO_KY)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus.select_SoGCS(pr_MA_DVIQLY, pr_MA_SOGCS, pr_TEN_SOGCS, pr_NGAY_GHI, Convert.ToInt16(pr_SO_KY));
                return ds;
            }
            catch
            {
                return null;
            }
        }
        #endregion


        #region QUANTRI
        [WebMethod]
        public DataSet select_D_DVI_QLY_captren(string strMadviqly)
        {
            DataSet ds = new DataSet();
            ds = bus_D_DVI_QLY.select_D_DVI_QLY_captren(strMadviqly);
            return ds;
        }

        [WebMethod]
        public DataSet get_SQUAN_TRI(string strmadvi, ref  string strErr)
        {
            DataSet ds = bus_D_DVI_QLY.get_SQUAN_TRI(strmadvi, ref strErr);
            return ds;
        }

        [WebMethod]
        public DataSet GET_DVIQLY_QUANTRI()
        {
            DataSet ds = bus_NPC_USER.GET_DVIQLY_QUANTRI();
            return ds;
        }
        [WebMethod]
        public DataSet GET_USER_QUANTRI(string USER_NAME, string PASS, string SMA_DVIQLY, ref string maloi)
        {
            DataSet ds = new DataSet();
            ds = bus_NPC_USER.GET_USER_QUANTRI(USER_NAME, PASS, SMA_DVIQLY, ref maloi);
            return ds;
        }
        [WebMethod]
        public DataSet GET_USERNAME(string SMA_DVIQLY, ref string maloi)
        {
            DataSet ds = bus_NPC_USER.GET_USERNAME(SMA_DVIQLY, ref maloi);
            return ds;
        }
        [WebMethod]
        public DataSet GET_USERNAME_NGUOIDUNG(string SMA_DVIQLY, string User, ref string maloi)
        {
            DataSet ds = bus_NPC_USER.GET_USERNAME_NGUOIDUNG(SMA_DVIQLY, User, ref maloi);
            return ds;
        }
        [WebMethod]
        public bool Check_USERNAME(string USER_NAME, string SMA_DVIQLY)
        {
            bool check = bus_NPC_USER.Check_USERNAME(USER_NAME, SMA_DVIQLY);
            return check;
        }

        [WebMethod]
        public bool insert_USERNAME(DataSet Entity, ref string maloi)
        {
            bool check = bus_NPC_USER.insert_USERNAME(Entity, ref maloi);
            return check;
        }

        [WebMethod]
        public bool delete_USERNAME(string s_dviqly, string username, ref string maloi)
        {
            bool check = bus_NPC_USER.delete_USERNAME(s_dviqly, username, ref maloi);
            return check;
        }

        [WebMethod]
        public bool update_USERNAME(string s_dviqly, string username, string fullname, string pass, string email, string phone, short trangthai, ref string maloi)
        {
            bool check = bus_NPC_USER.update_USERNAME(s_dviqly, username, fullname, pass, email, phone, trangthai, ref maloi);
            return check;
        }
        #endregion


        #region services NPC_LIBRARY
        [WebMethod]
        public DataSet select_NPC_LIBRARY_by_LIBID(long longLIBID)
        {
            DataSet ds = new DataSet();
            ds = bus_NPC_LIBRARY.select_NPC_LIBRARY_by_LIBID(longLIBID);
            return ds;
        }

        [WebMethod]
        public DataSet select_NPC_LIBRARY_1by1(DataSet Entity)
        {
            DataSet ds = new DataSet();
            ds = bus_NPC_LIBRARY.select_NPC_LIBRARY_1by1(Entity);
            return ds;
        }

        [WebMethod]
        public bool insert_NPC_LIBRARY(DataSet Entity, ref string strErr)
        {
            bool check;
            check = bus_NPC_LIBRARY.insert_NPC_LIBRARY(Entity, ref strErr);
            return check;
        }

        [WebMethod]
        public bool update_NPC_LIBRARY(DataSet Entity, ref string strErr)
        {
            bool check;
            check = bus_NPC_LIBRARY.update_NPC_LIBRARY(Entity, ref strErr);
            return check;
        }

        [WebMethod]
        public bool delete_NPC_LIBRARY(DataSet Entity, ref string strErr)
        {
            bool check;
            check = bus_NPC_LIBRARY.delete_NPC_LIBRARY(Entity, ref strErr);
            return check;
        }

        [WebMethod]
        public long GetNextSequence_Library(ref string strErr)
        {
            long NextSequence = -1;
            NextSequence = bus_NPC_LIBRARY.GetNextSequence(ref strErr);
            return NextSequence;
        }

        #endregion

        #region services NPC_MENU

        [WebMethod]
        public DataSet select_NPC_MENU_All()
        {
            DataSet ds = new DataSet();
            ds = bus_NPC_MENU.select_NPC_MENU_All();
            return ds;
        }

        [WebMethod]
        public DataSet select_NPC_MENU_by_ID(long longMENUID)
        {
            DataSet ds = new DataSet();
            ds = bus_NPC_MENU.select_NPC_MENU_by_ID(longMENUID);
            return ds;
        }

        [WebMethod]
        public DataSet select_NPC_MENU_by_ArrMENUID(Int64[] ArrMENUID)
        {
            DataSet ds = new DataSet();
            ds = bus_NPC_MENU.select_NPC_MENU_by_ArrMENUID(ArrMENUID);
            return ds;
        }

        [WebMethod]
        public DataSet select_NPC_MENU_by_PARENTID(long longMENUID)
        {
            DataSet ds = new DataSet();
            ds = bus_NPC_MENU.select_NPC_MENU_by_PARENTID(longMENUID);
            return ds;
        }

        //[WebMethod]
        //public DataSet select_NPC_MENU_by_LIBID(long longLIBID)
        //{
        //    DataSet ds = new DataSet();
        //    ds = bus_NPC_MENU.select_NPC_MENU_by_LIBID(longLIBID);
        //    return ds;
        //}

        [WebMethod]
        public bool insert_NPC_MENU(DataSet Entity, ref string strErr)
        {
            bool check;
            check = bus_NPC_MENU.insert_NPC_MENU(Entity, ref strErr);
            return check;
        }

        [WebMethod]
        public bool update_NPC_MENU(DataSet Entity, ref string strErr)
        {
            bool check;
            check = bus_NPC_MENU.update_NPC_MENU(Entity, ref strErr);
            return check;
        }

        [WebMethod]
        public bool delete_NPC_MENU(DataSet Entity, ref string strErr)
        {
            bool check;
            check = bus_NPC_MENU.delete_NPC_MENU(Entity, ref strErr);
            return check;
        }

        [WebMethod]
        public long GetNextSequence_menu(ref string strErr)
        {
            long NextSequence = -1;
            NextSequence = bus_NPC_MENU.GetNextSequence(ref strErr);
            return NextSequence;
        }

        #endregion

        #region services NPC_MENUOFUSER

        [WebMethod]
        public DataSet select_NPC_MENUOFUSER_by_USERID(string strSUBDIVISIONID, long longUSERID)
        {
            DataSet ds = new DataSet();
            ds = bus_NPC_MENUOFUSER.select_NPC_MENUOFUSER_by_USERID(strSUBDIVISIONID, longUSERID);
            return ds;
        }

        [WebMethod]
        public bool insert_NPC_MENUOFUSER(DataSet Entity, ref string strErr)
        {
            bool check;
            check = bus_NPC_MENUOFUSER.insert_NPC_MENUOFUSER(Entity, ref strErr);
            return check;
        }

        [WebMethod]
        public bool delete_NPC_MENUOFUSER(DataSet Entity, ref string strErr)
        {
            bool check;
            check = bus_NPC_MENUOFUSER.delete_NPC_MENUOFUSER(Entity, ref strErr);
            return check;
        }

        [WebMethod]
        public long GetNextSequence_menuofuser(ref string strErr)
        {
            long NextSequence = -1;
            NextSequence = bus_NPC_MENUOFUSER.GetNextSequence(ref strErr);
            return NextSequence;
        }

        #endregion

        #region TOGCS TUNGVT

        [WebMethod]
        public DataSet togcs(Int16 i16NamHD, Int16 i16ThangHD, Int16 i16Ky, string strMa_dviqly, string strMa_sogcs, string strMa_khang, ref string strErr)
        {
            DataSet ds = new DataSet();
            ds = bus.Togcs(i16NamHD, i16ThangHD, i16Ky, strMa_dviqly, strMa_sogcs, strMa_khang, ref strErr);
            return ds;
        }

        [WebMethod]
        public string hell()
        {
            return bus.hell();
        }

        [WebMethod]
        public DataSet TogcsNPC_Co(Int16 i16NamHD, Int16 i16ThangHD, Int16 i16Ky, string strMa_dviqly, string strMa_sogcs, string strMa_khang, string strLoaiCto, ref string strErr)
        {
            DataSet ds = new DataSet();
            ds = bus.TogcsNPC_Co(i16NamHD, i16ThangHD, i16Ky, strMa_dviqly, strMa_sogcs, strMa_khang, strLoaiCto, ref strErr);
            return ds;
        }

        [WebMethod]
        public DataSet TogcsNPC_Dtu(Int16 i16NamHD, Int16 i16ThangHD, Int16 i16Ky, string strMa_dviqly, string strMa_sogcs, string strMa_khang, string strLoaiCto, ref string strErr)
        {
            DataSet ds = new DataSet();
            ds = bus.TogcsNPC_Dtu(i16NamHD, i16ThangHD, i16Ky, strMa_dviqly, strMa_sogcs, strMa_khang, strLoaiCto, ref strErr);
            return ds;
        }

        [WebMethod]
        public DataSet DanhsachKHSogcs(string strMa_dviqly, string strMa_sogcs, string strMa_khang, ref string strErr)
        {
            DataSet ds = new DataSet();
            ds = bus.DanhsachKHSogcs(strMa_dviqly, strMa_sogcs, strMa_khang, ref strErr);
            return ds;
        }

        [WebMethod]
        public DataSet TogcsNPC_Co_DNGUON(Int16 i16NamHD, Int16 i16ThangHD, Int16 i16Ky, string strMa_dviqly, string strMa_sogcs, string strMa_khang, string strLoaiCto, ref string strErr)
        {
            DataSet ds = new DataSet();
            ds = bus.TogcsNPC_Co_DNGUON(i16NamHD, i16ThangHD, i16Ky, strMa_dviqly, strMa_sogcs, strMa_khang, strLoaiCto, ref strErr);
            return ds;
        }

        [WebMethod]
        public DataSet TogcsNPC_Dtu_DNGUON(Int16 i16NamHD, Int16 i16ThangHD, Int16 i16Ky, string strMa_dviqly, string strMa_sogcs, string strMa_khang, string strLoaiCto, ref string strErr)
        {
            DataSet ds = new DataSet();
            ds = bus.TogcsNPC_Dtu_DNGUON(i16NamHD, i16ThangHD, i16Ky, strMa_dviqly, strMa_sogcs, strMa_khang, strLoaiCto, ref strErr);
            return ds;
        }

        [WebMethod]
        public DataSet get_TT_SOGCS(string strMa_dviqly, string strMa_sogcs)
        {
            DataSet ds = new DataSet();
            ds = bus.get_TT_SOGCS(strMa_dviqly, strMa_sogcs);
            return ds;
        }

        [WebMethod]
        public DataSet get_D_SOGCS(string strMadviqly, ref string strErr)
        {
            DataSet ds = new DataSet();
            ds = bus.get_D_SOGCS(strMadviqly, ref strErr);
            return ds;
        }

        #endregion

        #region Thay doi thong tin Khach hang - TUNGVT

        [WebMethod]
        public DataSet Get_THONGTIN_KHANG_sogcs(string strMa_dviqly, string strMa_sogcs, ref string strErr)
        {
            DataSet ds = new DataSet();
            ds = bus_THONGTIN_KHANG.Get_THONGTIN_KHANG_sogcs(strMa_dviqly, strMa_sogcs, ref strErr);
            return ds;
        }

        [WebMethod]
        public DataSet Get_THONGTIN_KHANG_tram(string strMa_dviqly, string strMa_tram, ref string strErr)
        {
            DataSet ds = new DataSet();
            ds = bus_THONGTIN_KHANG.Get_THONGTIN_KHANG_tram(strMa_dviqly, strMa_tram, ref strErr);
            return ds;                 
        }

        [WebMethod]
        public bool insert_HDG_KHACH_HANG_TDTT(DataSet Entity, ref string strErr)
        {
            bool chek = false;
            chek = bus_THONGTIN_KHANG.insert_HDG_KHACH_HANG(Entity, ref strErr);
            return chek;
        }

        [WebMethod]
        public bool insert_HDG_DIEM_DO_TDTT(DataSet Entity, ref string strErr)
        {
            bool chek = false;
            chek = bus_THONGTIN_KHANG.insert_HDG_DIEM_DO(Entity, ref strErr);
            return chek;
        }

        [WebMethod]
        public bool insert_HDG_VITRI_DDO_TDTT(DataSet Entity, ref Int64 id_vitri_ddo, ref string strErr)
        {
            bool chek = false;
            chek = bus_THONGTIN_KHANG.insert_HDG_VITRI_DDO(Entity, ref id_vitri_ddo, ref strErr);
            return chek;
        }

        [WebMethod]
        public bool delete_HDG_KHACH_HANG_TDTT(DataSet ds, ref string strErr)
        {
            bool chek = false;
            chek = bus_THONGTIN_KHANG.delete_HDG_KHACH_HANG(ds, ref strErr);
            return chek;
        }

        [WebMethod]
        public bool delete_HDG_DIEM_DO_TDTT(DataSet ds, ref string strErr)
        {
            bool chek = false;
            chek = bus_THONGTIN_KHANG.delete_HDG_DIEM_DO(ds, ref strErr);
            return chek;
        }

        [WebMethod]
        public bool delete_HDG_VITRI_DDO_TDTT(DataSet ds, ref string strErr)
        {
            bool chek = false;
            chek = bus_THONGTIN_KHANG.delete_HDG_VITRI_DDO(ds, ref strErr);
            return chek;
        }

        [WebMethod]
        public bool update_HDG_KHACH_HANG_TDTT(DataSet Entity, ref string strErr)
        {
            bool chek = false;
            chek = bus_THONGTIN_KHANG.update_HDG_KHACH_HANG(Entity, ref strErr);
            return chek;
        }

        #endregion

        #region Thay doi thong tin Khach hang SMS - TUNGVT

        [WebMethod]
        public bool update_NPC_SUBS_SMS_sql(string strMakhang, string strDTHOAI, ref string strErr)
        {
            bool chek = false;
            chek = bus_THONGTIN_KHANG.update_NPC_SUBS_SMS_sql(strMakhang, strDTHOAI, ref strErr);
            return chek;
        }

        [WebMethod]
        public bool Insert_NPC_SUBS_SMS_sql(string strMadviqly, string strMakhang, string strDTHOAI, ref string strErr)
        {
            bool chek = false;
            chek = bus_THONGTIN_KHANG.Insert_NPC_SUBS_SMS_sql(strMadviqly, strMakhang, strDTHOAI, ref strErr);
            return chek;
        }        

        [WebMethod]
        public bool ktraKhangExistsSMS(string strMakhang)
        {
            bool chek = false;
            chek = bus_THONGTIN_KHANG.ktraKhangExistsSMS(strMakhang);
            return chek;
        }

        [WebMethod]
        public bool delete_NPC_SUBS_SMS_sql(string strMadviqly, string strMakhang, ref string strErr)
        {
            bool chek = false;
            chek = bus_THONGTIN_KHANG.delete_NPC_SUBS_SMS_sql(strMadviqly, strMakhang, ref strErr);
            return chek;
        }

        [WebMethod]
        public DataSet Get_THONGTIN_KHANG_sogcs_SMS(string strMa_dviqly, string strMa_sogcs, ref string strErr)
        {
            DataSet ds = new DataSet();
            ds = bus_THONGTIN_KHANG.Get_THONGTIN_KHANG_sogcs_SMS(strMa_dviqly, strMa_sogcs, ref strErr);
            return ds;
        }

        #endregion

        #region NPC_ATM
        [WebMethod]
        public DataSet get_dsKH_thuATM(string strMadvi, string strMaNH, string strMAPTTT, DateTime? pNgaythu_tu, DateTime? pNgaythu_den, int i_ttrang_no)
        {
            try
            {
                return bus.get_dsKH_thuATM(strMadvi, strMaNH, strMAPTTT, pNgaythu_tu, pNgaythu_den, i_ttrang_no);

            }
            catch (Exception ex)
            {
                return null;
            }
        }
        [WebMethod]
        public DataSet get_dsKH_thuATM_TNGAN(string strMadvi, string strMaTNGAN, DateTime? pNgaythu_tu, DateTime? pNgaythu_den)
        {
            try
            {
                return bus.get_dsKH_thuATM_TNGAN(strMadvi, strMaTNGAN, pNgaythu_tu, pNgaythu_den);

            }
            catch (Exception ex)
            {
                return null;
            }
        }
        [WebMethod]
        public DataSet get_DM_NHANG()
        {
            try
            {
                return bus.get_DM_NHANG();
            }
            catch { return null; }
        }
        [WebMethod]
        public DataSet get_DM_TNGAN(string strMadonvi)
        {
            try
            {
                return bus.get_DM_TNGANVIEN(strMadonvi);
            }
            catch { return null; }
        }
        [WebMethod]
        public DataSet get_PHTHUC_TTOAN()
        {
            try
            {
                return bus.get_PHTHUC_TTOAN();
            }
            catch { return null; }
        }
        [WebMethod]
        public DataSet get_TIMESPAN(string strMadonvi)
        {
            try
            {
                return bus.get_TIMESPAN(strMadonvi);
            }
            catch { return null; }
        }

        [WebMethod]
        public bool chamno_ATM(DataSet ds, DateTime pngaygiao, string strUsername, ref string ERRO)
        {
            try
            {
                if (bus.chamno_ATM(ds, pngaygiao, strUsername, ref ERRO))
                { return true; }
                else { return false; }
            }
            catch { return false; }
        }

        [WebMethod]
        public bool update_chamno_atm_ERRO(DataSet ds, string strUsername, ref string ERRO)
        {
            try
            {
                if (bus.update_chamno_atm_ERRO(ds, strUsername, ref ERRO))
                { return true; }
                else { return false; }
            }
            catch { return false; }
        }

        [WebMethod]
        public bool cancel_chamno_atm(DataSet ds, string strUsername, ref string ERRO)
        {
            try
            {
                if (bus.cancel_chamno_atm(ds, strUsername, ref ERRO))
                { return true; }
                else { return false; }
            }
            catch { return false; }
        }
        [WebMethod]
        public bool Insert_LogChamno(DataSet ds, string strUsername, string strMA_ERRO, short itinhtrang, string strMA_Thaotac, ref string ERRO)
        {
            try
            {
                if (bus.Insert_LogChamno(ds, strUsername,strMA_ERRO,itinhtrang,strMA_Thaotac, ref ERRO))
                { return true; }
                else { return false; }
            }
            catch { return false; }
        }
        #endregion

        #region ChamnoOFFLINE
        [WebMethod]
        public DataSet get_dsno(DataSet ds, string strMadvi)
        {
            try
            {

                return bus.get_dsno(ds, strMadvi);
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet get_dschamno(string strMadvi, string strMatngan, Int16 ithanght, Int16 inamht, int ilsu, DateTime? pNgaythu_tu, DateTime? pNgaythu_den)
        {
            try
            {

                return bus.get_dschamno(strMadvi, strMatngan, ithanght, inamht, ilsu, pNgaythu_tu, pNgaythu_den);
            }
            catch
            { return null; }
        }
        [WebMethod]
        public bool chamno_OFFLINE(DataSet ds, string strUsername, Int16 ithanght, Int16 inamht, ref string ERRO)
        {
            try
            {
                if (bus.chamno_OFFLINE(ds, strUsername, ithanght, inamht, ref ERRO))
                { return true; }
                else { return false; }
            }
            catch { return false; }
        }
        [WebMethod]
        public DataSet get_dsthutien_offline(string strMadvi, string strMatngan, Int16 ithanght, Int16 inamht, DateTime? pNgaythu_tu, DateTime? pNgaythu_den, DateTime? pNgaythu, int Danhsach, int IN_BC, string lanin)
        {
            try
            {

                return bus.get_dsthutien_offline(strMadvi, strMatngan, ithanght, inamht, pNgaythu_tu, pNgaythu_den, pNgaythu, Danhsach, IN_BC, lanin);
            }
            catch
            { return null; }
        }
        #endregion

        #region DUNGNT Trinh ky
        [WebMethod]
        public DataSet SelectTrinhKy(string strMadviqly, string TEN_BIEUBC)
        {
            try
            {
                return new clsTrinhKy_bus().SelectTrinhKy(strMadviqly, TEN_BIEUBC);
            }
            catch (Exception ex)
            {
                return null;
            }
        }

        [WebMethod]
        public bool SaveTrinhKy(DataSet ds)
        {
            try
            {
                return new clsTrinhKy_bus().SaveTrinhKy(ds);
            }
            catch (Exception ex)
            {
                return false;
                //throw RaiseException("", "", ex.Message, "", "", FaultCode.Server); ;
            }
        }

        [WebMethod]
        public bool InsertTrinhKy(DataSet ds)
        {
            try
            {
                return new clsTrinhKy_bus().InsertTrinhKy(ds);
            }
            catch (Exception ex)
            {
                return false;
                //throw RaiseException("", "", ex.Message, "", "", FaultCode.Server); ;
            }

        }
        #endregion

        #region EXCEL

        #region CHAMNO OFFLINE TUNGND
        [WebMethod]
        public DataSet TONGTIENCHAM(System.String strMaDviqly, System.String strMa_Tngan, int v_Thang, int v_Nam, ref string maloi)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_ImportExcel.TONGTIENCHAM(strMaDviqly, strMa_Tngan, v_Thang, v_Nam, ref maloi);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet get_DSLOG(string strMadvi, string ma_khang, Int64 id_hdon, string strMatngan, Int16 ithanght, Int16 inamht, string pNgayChamNo, int tugio, int dengio, int Danhsach, int IN_BC)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_ImportExcel.get_DSLOG(strMadvi, ma_khang, id_hdon, strMatngan, ithanght, inamht, pNgayChamNo, tugio, dengio, Danhsach, IN_BC);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public bool check_ATM(string ma_dviqly, Int64 id_hdon)
        {
            bool check;
            check = bus_ImportExcel.check_ATM(ma_dviqly, id_hdon);
            return check;
        }
        [WebMethod]
        public void TONGHOPBAOTOANDONVI(System.String strMaDviqly, int v_Thang, int v_Nam, ref string maloi)
        {
            try
            {
                bus_ImportExcel.TONGHOPBAOTOANDONVI(strMaDviqly, v_Thang, v_Nam, ref maloi);
            }
            catch
            { }
        }
        [WebMethod]
        public DataSet get_INBAOCAOTONGHOPDONVI(System.String strMaDviqly, System.String sma_tngan, string danhsach, System.DateTime v_Tngay, System.DateTime v_Dngay, ref string maloi)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_ImportExcel.get_INBAOCAOTONGHOPDONVI(strMaDviqly, sma_tngan, danhsach, v_Tngay, v_Dngay, ref maloi);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet Get_KhachHang(string ma_dviqly, string ma_khang, int thanght, int namht, ref string messger, ref string maloi)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_ImportExcel.Get_KhachHang(ma_dviqly, ma_khang, thanght, namht, ref messger, ref maloi);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet SELECT_HOADON_FILE(string ma_dviqly, string ma_khang, Int64 id_hdon, string check, ref string maloi)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_ImportExcel.SELECT_HOADON_FILE(ma_dviqly, ma_khang, id_hdon, check, ref maloi);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public bool chamno_OFFLINE_TUNGND(DataSet ds, string strUsername, int ithanght, int inamht, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.chamno_OFFLINE(ds, strUsername, ithanght, inamht, ref maloi);
            return check;
        }
        [WebMethod]
        public bool insert_NPC_CHAMNO_OFFLINE(DataSet Entity, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.insert_NPC_CHAMNO_OFFLINE(Entity, ref maloi);
            return check;
        }
        [WebMethod]
        public bool insert_NPC_CHAMNO_OFFLINE_LOG(DataSet Entity, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.insert_NPC_CHAMNO_OFFLINE_LOG(Entity, ref maloi);
            return check;
        }
        [WebMethod]
        public bool delete_NPC_CHAMNO_OFFLINE(string ma_dviqly, string ma_khang, Int64 id_hdon, int thanght, int namht, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.delete_NPC_CHAMNO_OFFLINE(ma_dviqly, ma_khang, id_hdon, thanght, namht, ref maloi);
            return check;
        }
        [WebMethod]
        public bool update_NPC_CHAMNO_OFFLINE_NHOM(string ma_dviqly, string ma_khang, Int64 id_hdon, int thanght, int namht, Int64 nhom, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.update_NPC_CHAMNO_OFFLINE_NHOM(ma_dviqly, ma_khang, id_hdon, thanght, namht, nhom, ref maloi);
            return check;
        }
        [WebMethod]
        public bool update_NPC_CHAMNO_OFFLINE_XOA(string strMadviqly, string strMatngan, int pthangIn, int pnamIn, DateTime? ngaynop, int trangthai, int DongCuoi, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.update_NPC_CHAMNO_OFFLINE_XOA(strMadviqly, strMatngan, pthangIn, pnamIn, ngaynop, trangthai, DongCuoi, ref maloi);
            return check;
        }
        [WebMethod]
        public void select_THANGNAMCONGNO(string ma_dviqly, ref int thang, ref int nam)
        {
            try
            {
                bus_ImportExcel.select_THANGNAMCONGNO(ma_dviqly, ref thang, ref nam);
            }
            catch
            { }
        }
        [WebMethod]
        public bool update_NPC_CHAMNO_OFFLINE_IN(string ma_dviqly, string ma_tngan, int thanght, int namht, DateTime? ngaynop, DateTime gionop, ref int trangthai, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.update_NPC_CHAMNO_OFFLINE_IN(ma_dviqly, ma_tngan, thanght, namht, ngaynop, gionop, ref trangthai, ref maloi);
            return check;
        }
        [WebMethod]
        public DataSet select_lannoptien(string ma_dviqly, string ma_tngan, int thanght, int namht, DateTime? ngaynop, ref string maloi)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_ImportExcel.select_lannoptien(ma_dviqly, ma_tngan, thanght, namht, ngaynop, ref maloi);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet select_HOADON_NHOM(string ma_dviqly, string ma_khang, string ma_tngan)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_ImportExcel.select_HOADON_NHOM(ma_dviqly, ma_khang, ma_tngan);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet select_HOADON_DUYETCHAM(string ma_dviqly, string ma_tngan, DateTime ngaycham)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_ImportExcel.select_HOADON_DUYETCHAM(ma_dviqly, ma_tngan, ngaycham);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet SELECT_CN_BBAN_TNGAN(System.String strMaDviqly, System.String v_MaTNgan, Int32 v_Dkien, ref string maloi)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_ImportExcel.SELECT_CN_BBAN_TNGAN(strMaDviqly, v_MaTNgan, v_Dkien, ref maloi);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet SELECT_CN_HOADON_TNGAN(System.String strMaDviqly, System.String v_MaTNgan, Int32 v_Ban, System.String v_MaSoGCS, System.String v_Hdon, Int32 v_Dkien, ref string maloi)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_ImportExcel.SELECT_CN_HOADON_TNGAN(strMaDviqly, v_MaTNgan, v_Ban, v_MaSoGCS, v_Hdon, v_Dkien, ref maloi);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet select_ThuNganVien(string ma_dviqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_ImportExcel.select_ThuNganVien(ma_dviqly);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet select_ThuNganVien_baocao(string ma_dviqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_ImportExcel.select_ThuNganVien_baocao(ma_dviqly);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet select_BB_GIAO_THU(string ma_dviqly, string ma_thungan)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_ImportExcel.select_BB_GIAO_THU(ma_dviqly, ma_thungan);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet select_CN_BB_GTHU(string ma_dviqly, string ma_TNV, DataSet dsbb)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_ImportExcel.select_CN_BB_GTHU(ma_dviqly, ma_TNV, dsbb);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet select_HOADON_GIAO_THU(string ma_dviqly, long BBAN_GIAO)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_ImportExcel.select_HOADON_GIAO_THU(ma_dviqly, BBAN_GIAO);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet select_MATRAM(string ma_dviqly, string ma_khang)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_ImportExcel.select_MATRAM(ma_dviqly, ma_khang);
                return ds;
            }
            catch
            { return null; }
        }
        #endregion

        [WebMethod]
        public int ID_DVI_DCHINH(string ma_dviqly)
        {
            int s = bus_ImportExcel.ID_DVI_DCHINH(ma_dviqly);
            return s;
        }
        [WebMethod]
        public bool checkdonvidiachinh(string ma_dviqly, string ma_diachinh)
        {
            bool check;
            check = bus_ImportExcel.checkdonvidiachinh(ma_dviqly, ma_diachinh);
            return check;
        }
        [WebMethod]
        public bool checktram(string ma_dviqly, string ma_tram)
        {
            bool check;
            check = bus_ImportExcel.checktram(ma_dviqly, ma_tram);
            return check;
        }
        [WebMethod]
        public bool check_sogcs(string ma_dviqly, string so_gcs, int thang, int nam)
        {
            bool check;
            check = bus_ImportExcel.check_sogcs(ma_dviqly, so_gcs, thang, nam);
            return check;
        }
        [WebMethod]
        public bool update_MATUSINH(string MA_DVIQLY, Int64 ID_HDG_MATUSINH, long ma_tu_sinh)
        {
            bool check;
            check = bus_ImportExcel.update_MATUSINH(MA_DVIQLY, ID_HDG_MATUSINH, ma_tu_sinh);
            return check;
        }
        [WebMethod]
        public bool update_hoso_cto(string ma_dviqly, string ma_cto, DateTime ngay_bdong)
        {
            bool check;
            check = bus_ImportExcel.update_hoso_cto(ma_dviqly, ma_cto, ngay_bdong);
            return check;
        }
        [WebMethod]
        public bool update_DD_HOSO_CTO(DataSet dt, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.update_DD_HOSO_CTO(dt, ref maloi);
            return check;
        }
        [WebMethod]
        public bool insert_DV_YCAU_KNAI(DataSet Entity, ref long id_MaYeuCau, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.insert_DV_YCAU_KNAI(Entity, ref id_MaYeuCau, ref maloi);
            return check;
        }
        [WebMethod]
        public bool insert_HDG_HOP_DONG(DataSet Entity, ref Int64 in_HDG_HOP_DONG, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.insert_HDG_HOP_DONG(Entity, ref in_HDG_HOP_DONG, ref maloi);
            return check;
        }
        [WebMethod]
        public bool insert_HDG_KHACH_HANG(DataSet Entity, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.insert_HDG_KHACH_HANG(Entity, ref maloi);
            return check;
        }
        [WebMethod]
        public bool insert_HDG_DIEM_DO(DataSet Entity, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.insert_HDG_DIEM_DO(Entity, ref maloi);
            return check;
        }
        [WebMethod]
        public bool insert_HDG_VITRI_DDO(DataSet Entity, ref Int64 id_vitri_ddo, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.insert_HDG_VITRI_DDO(Entity, ref id_vitri_ddo, ref maloi);
            return check;
        }
        [WebMethod]
        public bool insert_HDG_PTHUC_TTOAN(DataSet Entity, ref Int64 id_pthuc_ttoan, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.insert_HDG_PTHUC_TTOAN(Entity, ref id_pthuc_ttoan, ref maloi);
            return check;
        }
        [WebMethod]
        public bool insert_HDG_KHANG_LIENHE(DataSet Entity, ref Int64 id_lienhe, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.insert_HDG_KHANG_LIENHE(Entity, ref id_lienhe, ref maloi);
            return check;
        }
        [WebMethod]
        public bool insert_HDG_HO_NGHEO(DataSet Entity, ref Int64 id_hongheo, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.insert_HDG_HO_NGHEO(Entity, ref id_hongheo, ref maloi);
            return check;
        }
        [WebMethod]
        public bool insert_HDG_DDO_SOGCS(DataSet Entity, ref Int64 id_qhe, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.insert_HDG_DDO_SOGCS(Entity, ref id_qhe, ref maloi);
            return check;
        }
        [WebMethod]
        public bool insert_DD_BBAN_BDONG(DataSet Entity, ref Int64 id_bb, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.insert_DD_BBAN_BDONG(Entity, ref id_bb, ref maloi);
            return check;
        }
        [WebMethod]
        public bool insert_DD_BCS_CTO(DataSet Entity, ref Int64 id_bcs, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.insert_DD_BCS_CTO(Entity, ref id_bcs, ref maloi);
            return check;
        }
        [WebMethod]
        public bool insert_DD_BDONG_CTO(DataSet Entity, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.insert_DD_BDONG_CTO(Entity, ref maloi);
            return check;
        }
        [WebMethod]
        public bool insert_DD_BDONG_HTAI(DataSet Entity, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.insert_DD_BDONG_HTAI(Entity, ref maloi);
            return check;
        }
        [WebMethod]
        public bool insert_GCS_CHISO(DataSet Entity, ref Int64 id_chiso, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.insert_GCS_CHISO(Entity, ref id_chiso, ref maloi);
            return check;
        }
        [WebMethod]
        public bool insert_HDG_BBAN_APGIA(DataSet Entity, ref Int64 id_bbanagia, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.insert_HDG_BBAN_APGIA(Entity, ref id_bbanagia, ref maloi);
            return check;
        }
        [WebMethod]
        public bool insert_DD_BDONG_TTHAO(DataSet Entity, ref Int64 id_ls_treothao, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.insert_DD_BDONG_TTHAO(Entity, ref id_ls_treothao, ref maloi);
            return check;
        }
        [WebMethod]
        public bool insert_HDG_PHU_LUC_HD(DataSet Entity, ref Int64 id_phuluchdong, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.insert_HDG_PHU_LUC_HD(Entity, ref id_phuluchdong, ref maloi);
            return check;
        }
        [WebMethod]
        public bool delete_DV_YCAU_KNAI(DataSet dt, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.delete_DV_YCAU_KNAI(dt, ref  maloi);
            return check;
        }
        [WebMethod]
        public bool delete_HDG_HOP_DONG(DataSet dt, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.delete_HDG_HOP_DONG(dt, ref  maloi);
            return check;
        }
        [WebMethod]
        public bool delete_HDG_KHACH_HANG(DataSet dt, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.delete_HDG_KHACH_HANG(dt, ref  maloi);
            return check;
        }
        [WebMethod]
        public bool delete_HDG_DIEM_DO(DataSet dt, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.delete_HDG_DIEM_DO(dt, ref  maloi);
            return check;
        }
        [WebMethod]
        public bool delete_HDG_VITRI_DDO(DataSet dt, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.delete_HDG_VITRI_DDO(dt, ref  maloi);
            return check;
        }
        [WebMethod]
        public bool delete_HDG_PTHUC_TTOAN(DataSet dt, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.delete_HDG_PTHUC_TTOAN(dt, ref  maloi);
            return check;
        }
        [WebMethod]
        public bool delete_HDG_KHANG_LIENHE(DataSet dt, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.delete_HDG_KHANG_LIENHE(dt, ref  maloi);
            return check;
        }
        [WebMethod]
        public bool delete_HDG_HO_NGHEO(DataSet dt, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.delete_HDG_HO_NGHEO(dt, ref  maloi);
            return check;
        }
        [WebMethod]
        public bool delete_HDG_DDO_SOGCS(DataSet dt, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.delete_HDG_DDO_SOGCS(dt, ref  maloi);
            return check;
        }
        [WebMethod]
        public bool delete_DD_BBAN_BDONG(DataSet dt, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.delete_DD_BBAN_BDONG(dt, ref  maloi);
            return check;
        }
        [WebMethod]
        public bool delete_DD_BCS_CTO(DataSet dt, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.delete_DD_BCS_CTO(dt, ref  maloi);
            return check;
        }
        [WebMethod]
        public bool delete_DD_BDONG_CTO(DataSet dt, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.delete_DD_BDONG_CTO(dt, ref  maloi);
            return check;
        }
        [WebMethod]
        public bool delete_DD_BDONG_HTAI(DataSet dt, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.delete_DD_BDONG_HTAI(dt, ref  maloi);
            return check;
        }
        [WebMethod]
        public bool delete_GCS_CHISO(DataSet dt, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.delete_GCS_CHISO(dt, ref  maloi);
            return check;
        }
        [WebMethod]
        public bool delete_HDG_BBAN_APGIA(DataSet dt, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.delete_HDG_BBAN_APGIA(dt, ref  maloi);
            return check;
        }
        [WebMethod]
        public bool delete_HDG_PHU_LUC_HD(DataSet dt, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.delete_HDG_PHU_LUC_HD(dt, ref  maloi);
            return check;
        }
        [WebMethod]
        public bool delete_DD_BDONG_TTHAO(DataSet dt, ref string maloi)
        {
            bool check;
            check = bus_ImportExcel.delete_DD_BDONG_TTHAO(dt, ref  maloi);
            return check;
        }
        [WebMethod]
        public DataSet check_cto(string ma_dviqly, string so_cto, string ma_loai, string nam_sx)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_ImportExcel.check_cto(ma_dviqly, so_cto, ma_loai, nam_sx);
                return ds;
            }
            catch
            { return null; }
        }
        [WebMethod]
        public DataSet select_MATUSINH(string ma_dviqly, string kieu_ma)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_ImportExcel.select_MATUSINH(ma_dviqly, kieu_ma);
                return ds;
            }
            catch
            { return null; }
        }

        #endregion

        #region TUNGDT

        [WebMethod]
        public DataSet SELECT_HDON_THEOFILE_TRUNG(string strMaDviqly, string PMA_TNGAN)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.SELECT_HDON_THEOFILE_TRUNG(strMaDviqly, PMA_TNGAN);
                return ds;
            }
            catch (Exception ex) { return null; }
        }
        [WebMethod]
        public DataSet SELECT_HDON_STT(string strMaDviqly, string PMA_SOGCS, string CHECK, string PSTT)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.SELECT_HDON_STT(strMaDviqly, PMA_SOGCS, CHECK, PSTT);
                return ds;
            }
            catch (Exception ex) { return null; }
        }
        [WebMethod]
        public DataSet SELECT_CHAMNO_THEOFILE(string strMaDviqly, Int64 PSTT, string PMA_SOGCS, string check, ref string Err)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.SELECT_CHAMNO_THEOFILE(strMaDviqly, PSTT, PMA_SOGCS, check,ref Err);
                return ds;
            }
            catch (Exception ex) { return null; }
        }

        [WebMethod]
        public DataSet SELECT_ALL_THONGTIN_KHANG(string MA_DVIQLY)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.SELECT_ALL_THONGTIN_KHANG(MA_DVIQLY);
                return ds;
            }
            catch (Exception ex) { return null; }
        }

        [WebMethod]
        public DataSet SELECT_ALL_THONGTIN_KHANG_TNGAN(string MA_DVIQLY, string MA_TNGAN)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.SELECT_ALL_THONGTIN_KHANG_TNGAN(MA_DVIQLY, MA_TNGAN);
                return ds;
            }
            catch (Exception ex) { return null; }
        }

        [WebMethod]
        public void UPDATE_THONGTIN_KHACHHANG(string MA_DVIQLY, string MA_KHANG, string DCHI, string SDT, string WEBSITE,
            string EMAIL, DateTime NGAY_SINH, string FAX, string SO_CMT, DateTime NGAY_CAP, string NOI_CAP,
            string MA_TNGAN, string TRANG_THAI, string TEN_KHANG)
        {
            try
            {
                bus_CN_THEODOINO.UPDATE_THONGTIN_KHACHHANG(MA_DVIQLY, MA_KHANG, DCHI, SDT, WEBSITE,
            EMAIL, NGAY_SINH, FAX, SO_CMT, NGAY_CAP, NOI_CAP,
            MA_TNGAN, TRANG_THAI, TEN_KHANG);
            }
            catch (Exception ex) { }
        }

        [WebMethod]
        public void INSERT_THONGTIN_KHACHHANG(string MA_DVIQLY, string MA_KHANG, string DCHI, string SDT, string WEBSITE,
            string EMAIL, DateTime NGAY_SINH, string FAX, string SO_CMT, DateTime NGAY_CAP, string NOI_CAP,
            string MA_TNGAN, string TEN_KHANG)
        {
            try
            {
                bus_CN_THEODOINO.INSERT_THONGTIN_KHACHHANG(MA_DVIQLY, MA_KHANG, DCHI, SDT, WEBSITE,
                EMAIL, NGAY_SINH, FAX, SO_CMT, NGAY_CAP, NOI_CAP,
                MA_TNGAN, TEN_KHANG);
            }
            catch (Exception ex) { }
        }

        [WebMethod]
        public DataSet SELECT_THONGTIN_KHANG_CHODUYET(string ma_dviqly, string MA_KHANG)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.SELECT_THONGTIN_KHANG_CHODUYET(ma_dviqly, MA_KHANG);
                return ds;
            }
            catch (Exception ex) { return null; }
        }

        [WebMethod]
        public DataSet SELECT_THONGTIN_KHANG_CHODUYET_TNGAN(string ma_dviqly, string MA_TNGAN)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.SELECT_THONGTIN_KHANG_CHODUYET_TNGAN(ma_dviqly, MA_TNGAN);
                return ds;
            }
            catch (Exception ex) { return null; }
        }

        [WebMethod]
        public DataSet SELECT_TNGAN_THONGTIN_KHANG(string ma_dviqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.SELECT_TNGAN_THONGTIN_KHANG(ma_dviqly);
                return ds;
            }
            catch (Exception ex) { return null; }
        }

        [WebMethod]
        public void UPDATE_STATUS_KHACHHANG(string MA_DVIQLY, string MA_KHANG, string DCHI, string SDT, string WEBSITE,
            string EMAIL, DateTime NGAY_SINH, string FAX, string CMT, DateTime NGAY_CAP, string NOI_CAP,
            string TRANG_THAI, string TEN_KHANG)
        {
            try
            {
                bus_CN_THEODOINO.UPDATE_STATUS_KHACHHANG(MA_DVIQLY, MA_KHANG, DCHI, SDT, WEBSITE, EMAIL, NGAY_SINH, FAX, CMT, NGAY_CAP, NOI_CAP
                    , TRANG_THAI, TEN_KHANG);
            }
            catch (Exception ex) { }
        }

        [WebMethod]
        public void UPDATE_TRANGTHAI_KHACHHANG(string MA_DVIQLY, string MA_KHANG, string DCHI, string SDT, string WEBSITE,
            string EMAIL, DateTime NGAY_SINH, string FAX, string CMT, DateTime NGAY_CAP, string NOI_CAP,
            string TRANG_THAI, string TEN_KHANG)
        {
            try
            {
                bus_CN_THEODOINO.UPDATE_TRANGTHAI_KHACHHANG(MA_DVIQLY, MA_KHANG, DCHI, SDT, WEBSITE, EMAIL, NGAY_SINH, FAX, CMT, NGAY_CAP, NOI_CAP
                    , TRANG_THAI, TEN_KHANG);
            }
            catch (Exception ex) { }
        }

        [WebMethod]
        public DataSet SEARCH_THONGTIN_KHANG(string TU_KHOA, DateTime ngay)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.SEARCH_THONGTIN_KHANG(TU_KHOA, ngay);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet SELECT_HDON_CATDIEN(string ma_dviqly, string ma_tngan, DateTime ngay)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.SELECT_HDON_CATDIEN(ma_dviqly, ma_tngan, ngay);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet ChamnoOff_Nutcha(string ma_tngan, string ma_dvql)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_NPC_CHAMNO_OFFLINE.ChamnoOff_Nutcha(ma_tngan, ma_dvql);
                return ds;
            }
            catch { return null; }
        }
        [WebMethod]
        public DataSet ChamnoOff_Nutcha2(int bb_giao, string ma_tngan, string ma_dvql)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_NPC_CHAMNO_OFFLINE.ChamnoOff_Nutcha2(bb_giao, ma_tngan, ma_dvql);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet ChamnoOff_Nutcon(string so_gcs, int bb_giao, string ma_tngan, string ma_dvql)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_NPC_CHAMNO_OFFLINE.ChamnoOff_Nutcon(so_gcs, bb_giao, ma_tngan, ma_dvql);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet ChamnoOff_All(string ma_dvql)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_NPC_CHAMNO_OFFLINE.ChamnoOff_All(ma_dvql);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet DS_BBG(string ma_tngan, string ma_dvqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_NPC_CHAMNO_OFFLINE.DS_BBG(ma_tngan, ma_dvqly);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet DS_SoGCS(int ma_bbg, string ma_tngan, string ma_dvqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_NPC_CHAMNO_OFFLINE.DS_SoGCS(ma_bbg, ma_tngan, ma_dvqly);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet LOAD_DSTon(string ma_tngan, string ma_dviqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_NPC_CHAMNO_OFFLINE.LOAD_DSTon(ma_tngan, ma_dviqly);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet HDON_CHAMNONHANH(string ma_dviqly, string ma_tngan, Int64 id_hdon)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_NPC_CHAMNO_OFFLINE.HDON_CHAMNONHANH(ma_dviqly, ma_tngan, id_hdon);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet TNV_CHITIET_HDON(string ma_dviqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_NPC_CHAMNO_OFFLINE.TNV_CHITIET_HDON(ma_dviqly);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet DSTon_NutGoc(string ma_dvqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_NPC_CHAMNO_OFFLINE.DSTon_NutGoc(ma_dvqly);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet DSTon_Nutcha(string ma_tngan, string ma_dvqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_NPC_CHAMNO_OFFLINE.DSTon_Nutcha(ma_tngan, ma_dvqly);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet DSTon_Nutcha2(string ma_tngan, Int64 so_BBGIAO, string ma_dvqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_NPC_CHAMNO_OFFLINE.DSTon_Nutcha2(ma_tngan, so_BBGIAO, ma_dvqly);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet DSTon_Nutcon(string ma_tngan, Int64 so_BBGIAO, string Ma_SoGCS, string ma_dvqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_NPC_CHAMNO_OFFLINE.DSTon_Nutcon(ma_tngan, so_BBGIAO, Ma_SoGCS, ma_dvqly);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet LOAD_DACHAM_All(string ma_tngan, string ma_dvql)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_NPC_CHAMNO_OFFLINE.LOAD_DACHAM_All(ma_tngan, ma_dvql);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet DS_DACHAM_All(string ma_dvql)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_NPC_CHAMNO_OFFLINE.DS_DACHAM_All(ma_dvql);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet DS_DACHAM_NUTCHA(string ma_tngan, string ma_dvql)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_NPC_CHAMNO_OFFLINE.DS_DACHAM_NUTCHA(ma_tngan, ma_dvql);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet DS_DACHAM_NUTCHA2(int bb_giao, string ma_tngan, string ma_dvql)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_NPC_CHAMNO_OFFLINE.DS_DACHAM_NUTCHA2(bb_giao, ma_tngan, ma_dvql);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet DS_DACHAM_NUTCON(string so_gcs, int bb_giao, string ma_tngan, string ma_dvql)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_NPC_CHAMNO_OFFLINE.DS_DACHAM_NUTCON(so_gcs, bb_giao, ma_tngan, ma_dvql);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet LOAD_ATM(string ma_tngan, string ma_dviqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_NPC_CHAMNO_OFFLINE.LOAD_ATM(ma_tngan, ma_dviqly);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet DS_ATM_All(string ma_dvql)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_NPC_CHAMNO_OFFLINE.DS_ATM_All(ma_dvql);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet DS_ATM_NUTCHA(string ma_tngan, string ma_dvql)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_NPC_CHAMNO_OFFLINE.DS_ATM_NUTCHA(ma_tngan, ma_dvql);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet DS_ATM_NUTCHA2(int bb_giao, string ma_tngan, string ma_dvql)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_NPC_CHAMNO_OFFLINE.DS_ATM_NUTCHA2(bb_giao, ma_tngan, ma_dvql);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet DS_ATM_NUTCON(string so_gcs, int bb_giao, string ma_tngan, string ma_dvql)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_NPC_CHAMNO_OFFLINE.DS_ATM_NUTCON(so_gcs, bb_giao, ma_tngan, ma_dvql);
                return ds;
            }
            catch { return null; }
        }
        [WebMethod]
        public DataSet CN_So_BBGiao_Nutgoc(string ma_tngan, string ma_dvqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.CN_So_BBGiao_Nutgoc(ma_tngan, ma_dvqly);
                return ds;
            }
            catch { return null; }
        }
        [WebMethod]
        public DataSet TNV_DSTon(string ma_dviqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.Load_TNV(ma_dviqly);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet Catdien_Nutgoc(string ma_dvqly, DateTime ngay)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.Catdien_Nutgoc(ma_dvqly, ngay);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet Catdien_Nutcha(string ma_tngan, string ma_dvqly, DateTime ngay)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.Catdien_Nutcha(ma_tngan, ma_dvqly, ngay);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet Catdien_Nutcha2(string ma_tngan, Int64 so_BBGIAO, string ma_dvqly, DateTime ngay)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.Catdien_Nutcha2(ma_tngan, so_BBGIAO, ma_dvqly, ngay);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet Catdien_Nutcon(string ma_tngan, Int64 so_BBGIAO, string Ma_SoGCS, string ma_dvqly, DateTime ngay)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.Catdien_Nutcon(ma_tngan, so_BBGIAO, Ma_SoGCS, ma_dvqly, ngay);
                return ds;
            }
            catch { return null; }
        }

        [WebMethod]
        public DataSet CN_Select(string Username, string ma_dviqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.CN_Select(Username.ToUpper(), ma_dviqly);
                return ds;
            }
            catch { return null; }
        }
        [WebMethod]
        public DateTime Datetime()
        {
            try
            {
                return bus_NPC_CHAMNO_OFFLINE.Datetime();
            }
            catch { return System.DateTime.Now; }
        }
        [WebMethod]
        public DataSet select_ThuNganVien_TD(string ma_dviqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.select_ThuNganVien(ma_dviqly);
                return ds;
            }
            catch { return null; }
        }
        [WebMethod]
        public DataSet CN_So_BBGiao_Nutcha(string ma_tngan, int so_BBGIAO, string ma_dvqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.CN_So_BBGiao_Nutcha(ma_tngan, so_BBGIAO, ma_dvqly);
                return ds;
            }
            catch { return null; }
        }
        [WebMethod]
        public DataSet CN_So_BBGiao_Nutcon(string ma_tngan, int so_BBGIAO, string Ma_SoGCS, string ma_dvqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.CN_So_BBGiao_Nutcon(ma_tngan, so_BBGIAO, Ma_SoGCS, ma_dvqly);
                return ds;
            }
            catch { return null; }
        }
        [WebMethod]
        public DataSet Ten_Tngan(string ma_tngan, string ma_dviqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.Ten_Tngan(ma_tngan, ma_dviqly);
                return ds;
            }
            catch { return null; }
        }
        [WebMethod]
        public DataSet ATM_Ton_Select(string ma_tngan, string ma_dvqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.ATM_Ton_Select(ma_tngan, ma_dvqly);
                return ds;
            }
            catch { return null; }
        }
        [WebMethod]
        public DataSet SELECT_CHAMNO_OFFLINE_NUTCHA(string ma_dviqly, string ma_tngan)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.SELECT_CHAMNO_OFFLINE_NUTCHA(ma_dviqly, ma_tngan);
                return ds;
            }
            catch { return null; }
        }
        [WebMethod]
        public DataSet SELECT_CHAMNO_OFFLINE_NUTSO_BBG(string ma_dviqly, string ma_tngan, int SO_BBGIAO)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.SELECT_CHAMNO_OFFLINE_NUTSO_BBG(ma_dviqly, ma_tngan, SO_BBGIAO);
                return ds;
            }
            catch { return null; }
        }
        [WebMethod]
        public DataSet SELECT_CHAMNO_OFFLINE_NUTSO_GCS(string ma_dviqly, string ma_tngan, int SO_BBGIAO, string MA_SOGCS)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.SELECT_CHAMNO_OFFLINE_NUTSO_GCS(ma_dviqly, ma_tngan, SO_BBGIAO, MA_SOGCS);
                return ds;
            }
            catch { return null; }
        }
        [WebMethod]
        public DataSet SELECT_ATM_NUT_TNGAN(string ma_dviqly, string MA_TNGAN)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.SELECT_ATM_NUT_TNGAN(ma_dviqly, MA_TNGAN);
                return ds;
            }
            catch { return null; }
        }
        [WebMethod]
        public DataSet SELECT_ATM_NUT_SOBBGIAO(string ma_dviqly, string MA_TNGAN, int SO_BBGIAO)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.SELECT_ATM_NUT_SOBBGIAO(ma_dviqly, MA_TNGAN, SO_BBGIAO);
                return ds;
            }
            catch { return null; }
        }
        [WebMethod]
        public DataSet SELECT_ATM_NUT_MASOGCS(string ma_dviqly, string MA_TNGAN, int SO_BBGIAO, string MA_SOGCS)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.SELECT_ATM_NUT_MASOGCS(ma_dviqly, MA_TNGAN, SO_BBGIAO, MA_SOGCS);
                return ds;
            }
            catch { return null; }
        }
        [WebMethod]
        public DataSet SELECT_HDON_TON_NUTTNGAN(string ma_dvqly, string ma_tngan)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.SELECT_HDON_TON_NUTTNGAN(ma_dvqly, ma_tngan);
                return ds;
            }
            catch { return null; }
        }
        [WebMethod]
        public DataSet SELECT_TNGAN_THEOBBGIAO(string ma_dvqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.SELECT_TNGAN_THEOBBGIAO(ma_dvqly);
                return ds;
            }
            catch { return null; }
        }
        [WebMethod]
        public DataSet SELECT_TNGAN_ATM(string ma_dvqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.SELECT_TNGAN_ATM(ma_dvqly);
                return ds;
            }
            catch { return null; }
        }
        [WebMethod]
        public DataSet SELECT_TNGAN_HD_TON(string ma_dvqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.SELECT_TNGAN_HD_TON(ma_dvqly);
                return ds;
            }
            catch { return null; }
        }
        [WebMethod]
        public DataSet SELECT_TNGAN_ALL(string ma_dvqly)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.SELECT_TNGAN_ALL(ma_dvqly);
                return ds;
            }
            catch { return null; }
        }
        [WebMethod]
        public DataSet SELECT_HDON(string ma_dvqly, string ma_tngan)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.SELECT_HDON(ma_dvqly, ma_tngan);
                return ds;
            }
            catch { return null; }
        }
        [WebMethod]
        public DataSet SELECT_THONGTIN_KHANG(string ma_dviqly, string MA_KHANG)
        {
            DataSet ds = new DataSet();
            try
            {
                ds = bus_CN_THEODOINO.SELECT_THONGTIN_KHANG(ma_dviqly, MA_KHANG);
                return ds;
            }
            catch { return null; }
        }
        #endregion

        #region anhktv
        [WebMethod]
        public DataSet get_DSTHUTIENPHIEUTHU(string strMadvi, string strMatngan, Int32 ithanght, Int32 inamht, DateTime pNgaythu_tu, DateTime pNgaythu_den, int IN_BC)
        {
            try
            {
                DataSet ds = new DataSet();
                return ds = bus_CN_THEODOINO.get_DSTHUTIENPHIEUTHU(strMadvi, strMatngan, ithanght, inamht, pNgaythu_tu, pNgaythu_den, IN_BC);
            }
            catch (Exception ex) { return null; }
        }
        #endregion


    }

}

